

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'student.label', default: 'Student')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="body">
            <h1><g:message code="default.list.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
        <div class="nav">
         
        </div>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                         
                            <th>${message(code: 'student.name.label', default: 'name')}</th>
                            <th>${message(code: 'student.sex.label', default: 'sex')}</th>
                            <th>${message(code: 'classes.label', default: '班级')}</th>
                             
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${studentInstanceList}" status="i" var="studentInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'} ${(i % 10) == 0 ? 'topColumn' : ''}">
                        
                        
                            <td><g:link controller="student" action="show" id="${studentInstance.id}">${fieldValue(bean: studentInstance, field: "name")}</g:link></td>
                        
                            <td>${fieldValue(bean: studentInstance, field: "sex")}</td>
                         
                            <td>${studentInstance?.classes?.encodeAsHTML()}</td>
                       
                            <td  >
                            <g:if test="${course}">
                                <g:link controller="scoreAnalyze" action="courseLine" id="${studentInstance.id}" params="[course: course]">${course}成绩分析</g:link> |
                            </g:if>
                            <g:else>
                                <g:each in="${org.grails.plugins.lookups.Lookup.codeList('courses')}" var="lookup">
                                    <g:link controller="scoreAnalyze" action="courseLine" id="${studentInstance.id}" params="[course: lookup.value]">${lookup.value}</g:link> |
                                </g:each>
                            </g:else>
                            <g:link controller="scoreAnalyze" action="courseAllLine" id="${studentInstance.id}" >各科成绩分析</g:link>
                             
                            </td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
            </div>
        </div>
    </body>
</html>
